using UnityEngine;
using UnityEngine.UI;

public class UIB_ButtonListener_Script : MonoBehaviour
{
    private Button button;

    private void Awake()
    {
        button = GetComponent<Button>();
    }

    void Start()
    {
        button.onClick.AddListener(OnButtonClick);
    }

    private void OnButtonClick()
    {
        Debug.Log("ButtonListener Clicked: button组件的监听添加，该方法不能有参数和返回类型。");
    }

}